package com.java.Service;

import com.java.dao.BaseAdminDao;
import com.java.dao.imp.AdminDaoMysql;

import java.util.Date;

/**
 * @Author Clarklevis
 * @Date 2021/5/24
 */
public class AdminService {
    private static BaseAdminDao dao =  new AdminDaoMysql();

    /**
     * 更新登陆时间和ip
     * @param username
     * @param date
     * @param ip
     */
    public static void updateLoginTimeAndIp(String username, Date date, String ip){
        dao.updateLoginTime(username, date, ip);
    }

    /**
     * 登录
     * @param username
     * @param password
     * @return
     */
    public static boolean login(String username, String password){
        return dao.login(username, password);
    }

}
